Techniques for extracting contours from a target image, such as an SEM image of a semiconductor pattern, and so forth, are referred to as edge extraction or contour extraction and have conventionally been in popular use. By way of example, Patent Literature 1 discloses a technique in which edges are extracted by performing thresholding and thinning after edge enhancement using a non-linear second-order derivative filter, the extracted edges are linked, and contours of the pattern are constructed by linear approximation. For edge enhancement, first-order derivative filters, such as the Sobel filter, etc., may sometimes be used besides second-order derivative filters.
However, such methods that extract edges from local information were problematic in that they caused discontinuity, spuriousness, duplication, branches, etc., in the contours of semiconductor patterns.
On the other hand, techniques that search for pre-registered shapes from a target image are known as template matching and are in wide use. Further, by way of example, Patent Literature 2 discloses a method in which design data, which is the base data for generating a semiconductor pattern, and a semiconductor pattern are aligned through template matching, and edges extracted with a first-order derivative or second-order derivative filter are mapped to the design data, thereby constructing contours of the pattern. According to this method, it is possible to resolve spuriousness, duplication, or branches in the edges of the contours.